package com.shrio.test.service.impl;

import com.shrio.test.controls.UserControl;
import com.shrio.test.dao.UserDao;
import com.shrio.test.entity.UserEntity;
import com.shrio.test.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by joychen on 2018/2/26.
 */
@Service
public class UserServiceImpl implements UserService {


    private static final Logger logger = LoggerFactory
            .getLogger(UserServiceImpl.class);

    @Autowired
    UserDao userDao;


    public UserEntity findUser(String username) {
        UserEntity userEntity  = null;
        try{
             userEntity = userDao.select("uname", username);
        }catch (Exception e){
            logger.info("用户名错误");
        }


//        AssertThowUtil.assertNotNull("用名为空",userEntity);

        return userEntity;
    }

    public List<String> getRoles(String username) {


        return null;
    }
}

